<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-07-19
 * Time: 下午 3:13
 */
namespace app\admin\model;
use think\Model;

class FeedBackModel extends Model
{
    // 确定链接表名
    protected $name = 'feedback';
    //查询意见反馈列表
    public function getFeedbackByWhere($where, $offset, $limit,$join,$condition)
    {
        return $this->where($where)->join($join,$condition)->limit($offset, $limit)->order('snake_feedback.id desc')->select();
    }
    //查询反馈总数量
    public function getFeedbackCount($where,$join,$condition)
    {
        return $this->where($where)->join($join,$condition)->count();
    }
    //删除记录
    public function getFeedbackDel($map){
        return $this->where($map)->delete();
    }
    //查询会员详情
    public function getMemberInfo($mid)
    {
        $map['member_id'] = $mid;
        return $this->where($map)->find();
    }
}